package com.dengwei.smali.first.dwpull_to_refresh.PullToRefresh;

import android.content.Context;
import android.util.AttributeSet;

import com.dengwei.smali.first.dwpull_to_refresh.PullToRefresh.header.RefreshDefaultHeader;

/**
 * Created by dengwei on 2017/3/19.
 */

public class TjPullToRefreshLayout extends PullToRefreshFrameLayout {

    private RefreshDefaultHeader mHeaderView;

    public TjPullToRefreshLayout(Context context) {
        this(context,null);
    }

    public TjPullToRefreshLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public TjPullToRefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initViews();
    }

    private void initViews() {
        mHeaderView = new RefreshDefaultHeader(getContext());
        setHeaderView(mHeaderView);
        addPtrUIHandler(mHeaderView);
    }

    public RefreshDefaultHeader getHeader() {
        return mHeaderView;
    }
}
